package com.lagou.controller;

import com.lagou.service.MemberService;
import com.lagou.service.MemberService2;
import javafx.util.Pair;
import org.apache.dubbo.config.annotation.Reference;
import org.apache.dubbo.rpc.RpcContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class ConsumerController {

    @Reference
    private MemberService memberService;

    @Reference
    private MemberService2 memberService2;

    @GetMapping("hello")
    public Pair<String, String> hello() {
        String resp1 = memberService.getName("world");
        String resp2 = memberService2.getName("world");
        return new Pair<>(resp1, resp2);
    }

}
